package com.lkqandzzy.dao;

import com.lkqandzzy.entity.Dormitory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 邹靓仔and小帅龙
 * @date 2019/12/29-13:23-星期日-DormitoryManager-ssm
 */
public interface DormitoryDao {

    /**
     * 进行分页查询
     */

    //获取总条数
    //@Param注解单一属性
     Integer totalCount(@Param("a_name") String a_name, @Param("s_dormitoryid") Integer s_dormitoryid, @Param("d_dormbuilding") String d_dormbuilding);
    //获取用户列表
    //@Param注解单一属性
     List<Dormitory> getDormitoryList(@Param("a_name") String a_name, @Param("s_dormitoryid") Integer s_dormitoryid, @Param("d_dormbuilding") String d_dormbuilding, @Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);

     int addDormitory(Dormitory dormitory);    //添加宿舍信息
     int deleteDormitory(Integer d_id);   //删除宿舍信息
     int updateDormitory(Dormitory dormitory); //修改宿舍信息
     Dormitory findDormitoryById(Integer d_id);

     List<Dormitory> findDormitoryStudent(Dormitory dormitory);//查询宿舍人员信息
     List<Dormitory> getAll();
}
